#ifndef J3DGRAPH_BMD_DRW1_HEADER
#define J3DGRAPH_BMD_DRW1_HEADER

// this header needs
#include <stdio.h>
#include "../../J3DGRAPH.h"

// BMD DRW1 section constants
#define J3DGRAPH_BMD_DRW1_POS 3
#define J3DGRAPH_BMD_DRW1_MIN_SIZE 32 // KoopaJrShip.bdl

// j3dgraph_bmd_drw1_err_cd enum
// enum with the possible codes a DRW1 section will present while analizing it
// errors codes are organized so fatal errors have less magnitude than the soft errors
typedef enum
{
  J3DGRAPH_BMD_DRW1_ERR_INV_STRUCT, // j3dgraph struct ptr is NULL/empty
  J3DGRAPH_BMD_DRW1_ERR_HEADER,     // section header is inconsistent
  
  J3DGRAPH_BMD_DRW1_ERR_NO_ERR,     // errors below this (in value) are fatal, above or equal are safe
  
  // ...
} j3dgraph_bmd_drw1_err_cd;

// need to investigate more about this section
typedef struct
{
  // my additions
  char * PATH;                      // file path
  ENDIAN_T ENDIAN;                  // endian
  j3dgraph_bmd_drw1_err_cd ERR_CD;  // error code
  // actual structure
  byte * START;                     // 00 char[4]
  byte * SIZE;                      // 01 uint32
  // ...
} j3dgraph_bmd_drw1;

// functions to check the information on the DRW1 section
j3dgraph_bmd_drw1_err_cd check_j3dgraph_bmd_drw1(j3dgraph * file);

// append/remove/print the j3dgraph_bmd_drw1
// structure to an incomplete j3dgraph structure
j3dgraph_bmd_drw1 * append_j3dgraph_bmd_drw1(j3dgraph * file);
void remove_j3dgraph_bmd_drw1(j3dgraph * file);
void print_j3dgraph_bmd_drw1(j3dgraph_bmd_drw1 * drw1);

#include "DRW1.c"

#endif // J3DGRAPH_BMD_DRW1_HEADER
